package com.tulink.yichutu.controller.wxpay;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import com.tulink.yichutu.common.utils.DataResult;

import com.tulink.yichutu.entity.WxVipOrderPayLogEntity;
import com.tulink.yichutu.service.WxVipOrderPayLogService;



/**
 * 订单支付记录表
 *
 * @author wenbin
 * @email *****@mail.com
 * @date 2021-10-04 02:02:48
 */
@Controller
@RequestMapping("/")
public class WxVipOrderPayLogController {
    @Autowired
    private WxVipOrderPayLogService wxVipOrderPayLogService;


    /**
    * 跳转到页面
    */
    @GetMapping("/index/wxVipOrderPayLog")
    public String wxVipOrderPayLog() {
        return "wxviporderpaylog/list";
        }

    @ApiOperation(value = "查询分页数据")
    @PostMapping("wxVipOrderPayLog/listByPage")
    @RequiresPermissions("wxVipOrderPayLog:list")
    @ResponseBody
    public DataResult findListByPage(@RequestBody WxVipOrderPayLogEntity wxVipOrderPayLog){
        Page page = new Page(wxVipOrderPayLog.getPage(), wxVipOrderPayLog.getLimit());
        LambdaQueryWrapper<WxVipOrderPayLogEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        //queryWrapper.eq(WxVipOrderPayLogEntity::getId, wxVipOrderPayLog.getId());
        IPage<WxVipOrderPayLogEntity> iPage = wxVipOrderPayLogService.page(page, queryWrapper);
        return DataResult.success(iPage);
    }

}
